#include "../Control/Control.h"
#include "MsgBoxPainter.h"
#include "MessageBoxCon.h"


CMsgBoxPainter::CMsgBoxPainter(void)
{
}

CMsgBoxPainter::~CMsgBoxPainter(void)
{
}

void CMsgBoxPainter::Paint(CDC* pDC, CContainer* pContainer, CRect& rc)
{
	int nCount = pContainer->m_vecControls.size();
	CMessageBoxCon* pContainerTmp = (CMessageBoxCon*)pContainer;

	if(!pContainerTmp->GetMaskBmp()->IsNull())
	{
#ifndef UNDER_CE
		pDC->AlphaBlendEx(rc,pContainerTmp->GetMaskBmp()->m_hBitmap,rc,160);
#else
		pDC->AlphaBlendEx(rc,pContainerTmp->GetMaskBmp()->m_hBitmap,rc,110);
#endif

	}
	else
	{
		pDC->FillSolidRect(rc,pContainerTmp->GetBackColor());
	}

	for(int i=0; i < nCount; i++)
		pContainer->m_vecControls.at(i)->Paint(pDC);
}